//
//  LoDeContentViewController.h
//  Wallets Manager
//
//  Created by MAC on 10/31/12.
//  Copyright (c) 2012 BKHN. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SNPopupView.h"
#import "Loan.h"
#import "Debt.h"
#import "folyAppDelegate.h"
#import "DataBaseAccess.h"
#import "AddLoanViewController.h"
#import "AddDebtViewController.h"
#import "ViewLoanViewController.h"
#import "ViewDebtViewController.h"
#import "PayHistoryAlertView.h"

@interface LoDeContentViewController : UIViewController <UITableViewDataSource,UITableViewDelegate,SNPopupViewModalDelegate> {
    
    SNPopupView		*popup;
    NSIndexPath     *currentIndexPath;
    
    int loanRowNumber;
    int debtRowNumber;
    
    Loan *currentLoan;
    Debt *currentDebt;
    NSMutableArray *loanArray;
    NSMutableArray *debtArray;
    
    PayHistoryAlertView *payHistoryAlertView;
    
    NSMutableArray *loanCompletedArray;
    NSMutableArray *debtCompletedArray;
    
    double loanSum;
    double debtSum;
}
@property (weak, nonatomic) IBOutlet UITableView *loandebtTableView;
@property (strong, nonatomic) IBOutlet UIView *popUpViewHistory;
@property (strong, nonatomic) IBOutlet UIView *popUpViewHistoryFinished;
@property (strong,nonatomic) NSDate *currentDate;
@property (strong,nonatomic) NSDate *startDate;
@property (strong,nonatomic) NSDate *endDate;
@property (assign,nonatomic) BOOL   isCategoryMode;
@property (weak, nonatomic) IBOutlet UILabel *loanTotal;
@property (weak, nonatomic) IBOutlet UILabel *debtTotal;

-(void) reloadCustomDateTable;
-(void) reloadDailyTable;
-(void) reloadTableByCategory;
- (IBAction)editButtonPressed:(id)sender;
- (IBAction)deleteButtonPressed:(id)sender;
- (IBAction)viewButtonPressed:(id)sender;
- (IBAction)payButtonPressed:(id)sender;

@end
